package com.example.lijinyuan.baseandroid.Service;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

/**
 * Created by lijinyuan on 15/11/28.
 */
public class ToBindService extends Service{
    @Override
    public void onCreate() {
        Log.d("Oncreat", "Oncreat");
        super.onCreate();
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.d("onBind", "onBind");
        return new MyBindService();
    }
    public class MyBindService extends Binder {
        public ToBindService getService() {
            return ToBindService.this;
        }
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.d("onUnbind", "onUnbind");
        return super.onUnbind(intent);
    }

    @Override
    public void onDestroy() {
        Log.d("onDestroy", "onDestroy");

        super.onDestroy();
    }
    public void Play() {
        Log.i("info", "播放");
    }

    public void Pause() {
        Log.i("info", "暂停");
    }

    public void Pervious() {
        Log.i("info", "上一首");
    }

    public void next() {
        Log.i("info", "下一首");
    }
}
